<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: src/include/lwip/apps/mqtt.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('mqtt_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">mqtt.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="mqtt__opts_8h.html">lwip/apps/mqtt_opts.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="err_8h.html">lwip/err.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ip__addr_8h.html">lwip/ip_addr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="iana_8h.html">lwip/prot/iana.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmqtt__connect__client__info__t.html">mqtt_connect_client_info_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaa8632baff6bbb5004385998918f1e6bd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gaa8632baff6bbb5004385998918f1e6bd">MQTT_PORT</a>&#160;&#160;&#160;<a class="el" href="group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a172d486d82c552ef3540cf8d61b14b22">LWIP_IANA_PORT_MQTT</a></td></tr>
<tr class="separator:gaa8632baff6bbb5004385998918f1e6bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6610174f17b9ecbcf2bc66a4fd5a6b0f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#ga6610174f17b9ecbcf2bc66a4fd5a6b0f">MQTT_TLS_PORT</a>&#160;&#160;&#160;<a class="el" href="group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0ab833e9dc7646bd7affde45691bc66601">LWIP_IANA_PORT_SECURE_MQTT</a></td></tr>
<tr class="separator:ga6610174f17b9ecbcf2bc66a4fd5a6b0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga83d6a6d811b201a74d793bc1b5d4e029"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#ga83d6a6d811b201a74d793bc1b5d4e029">mqtt_subscribe</a>(client,  topic,  qos,  cb,  arg)&#160;&#160;&#160;<a class="el" href="group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103">mqtt_sub_unsub</a>(client, topic, qos, cb, arg, 1)</td></tr>
<tr class="separator:ga83d6a6d811b201a74d793bc1b5d4e029"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f133ef09cbe56c46ebe2cc21afccf3f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#ga0f133ef09cbe56c46ebe2cc21afccf3f">mqtt_unsubscribe</a>(client,  topic,  cb,  arg)&#160;&#160;&#160;<a class="el" href="group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103">mqtt_sub_unsub</a>(client, topic, 0, cb, arg, 0)</td></tr>
<tr class="separator:ga0f133ef09cbe56c46ebe2cc21afccf3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga8558743bdb7d599a93844fbc56c9029f"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#ga8558743bdb7d599a93844fbc56c9029f">mqtt_connection_cb_t</a>) (<a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *client, void *arg, <a class="el" href="group__mqtt.html#ga8cf0f360ab20343af37e1d124395a77d">mqtt_connection_status_t</a> status)</td></tr>
<tr class="separator:ga8558743bdb7d599a93844fbc56c9029f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafec7e75fe6a746eef9ca411463446c81"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gafec7e75fe6a746eef9ca411463446c81">mqtt_incoming_data_cb_t</a>) (void *arg, const u8_t *data, u16_t len, u8_t flags)</td></tr>
<tr class="separator:gafec7e75fe6a746eef9ca411463446c81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7116bb85255394cec4b1d9fa38842c29"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#ga7116bb85255394cec4b1d9fa38842c29">mqtt_incoming_publish_cb_t</a>) (void *arg, const char *topic, u32_t tot_len)</td></tr>
<tr class="separator:ga7116bb85255394cec4b1d9fa38842c29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacad2bbe2cee76eaa120cc63e2f6094fd"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gacad2bbe2cee76eaa120cc63e2f6094fd">mqtt_request_cb_t</a>) (void *arg, <a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> err)</td></tr>
<tr class="separator:gacad2bbe2cee76eaa120cc63e2f6094fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga8cf0f360ab20343af37e1d124395a77d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#ga8cf0f360ab20343af37e1d124395a77d">mqtt_connection_status_t</a> { <br />
&#160;&#160;<a class="el" href="group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da074dc1d289b8e8d4aad91f6a2cb93dc1">MQTT_CONNECT_ACCEPTED</a> = 0, 
<a class="el" href="group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da41f8aa97142be337cb639f94d9145190">MQTT_CONNECT_REFUSED_PROTOCOL_VERSION</a> = 1, 
<a class="el" href="group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da28ffe49b0175adaa2b9a27cb4873224a">MQTT_CONNECT_REFUSED_IDENTIFIER</a> = 2, 
<a class="el" href="group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77dade28ec1c2ce3d874e91251d683c92b2a">MQTT_CONNECT_REFUSED_SERVER</a> = 3, 
<br />
&#160;&#160;<a class="el" href="group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da290cf9037054c42022cc864cfade896a">MQTT_CONNECT_REFUSED_USERNAME_PASS</a> = 4, 
<a class="el" href="group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77dafc4888158dd6ee84269a5f0bfdc12b17">MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_</a> = 5, 
<a class="el" href="group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da321f5ce31b173f235de1a517fcfd00dd">MQTT_CONNECT_DISCONNECTED</a> = 256, 
<a class="el" href="group__mqtt.html#gga8cf0f360ab20343af37e1d124395a77da57153f2ab4331c6f76a9ee74e1bcfc62">MQTT_CONNECT_TIMEOUT</a> = 257
<br />
 }</td></tr>
<tr class="separator:ga8cf0f360ab20343af37e1d124395a77d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99fb83031ce9923c84392b4e92f956b5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group__mqtt.html#gga99fb83031ce9923c84392b4e92f956b5a79cd00d0a5a8df13207e0c49447df87f">MQTT_DATA_FLAG_LAST</a> = 1
 }</td></tr>
<tr class="separator:ga99fb83031ce9923c84392b4e92f956b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gadf4d2a3f1b12fb6cbc020b126f3125f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gadf4d2a3f1b12fb6cbc020b126f3125f0">mqtt_client_connect</a> (<a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *client, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *ipaddr, u16_t port, <a class="el" href="group__mqtt.html#ga8558743bdb7d599a93844fbc56c9029f">mqtt_connection_cb_t</a> cb, void *arg, const struct <a class="el" href="structmqtt__connect__client__info__t.html">mqtt_connect_client_info_t</a> *client_info)</td></tr>
<tr class="separator:gadf4d2a3f1b12fb6cbc020b126f3125f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73d8dd718bce09bfaab452770b4f76e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#ga73d8dd718bce09bfaab452770b4f76e6">mqtt_disconnect</a> (<a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *client)</td></tr>
<tr class="separator:ga73d8dd718bce09bfaab452770b4f76e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae7e19e236eb6122c8c39e93db6f5f53f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gae7e19e236eb6122c8c39e93db6f5f53f">mqtt_client_new</a> (void)</td></tr>
<tr class="separator:gae7e19e236eb6122c8c39e93db6f5f53f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa0fa1d985c322a9c91a51322db254882"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gaa0fa1d985c322a9c91a51322db254882">mqtt_client_free</a> (<a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *client)</td></tr>
<tr class="separator:gaa0fa1d985c322a9c91a51322db254882"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga98f0fd168112b8b7db59bcd7a325a5c5"><td class="memItemLeft" align="right" valign="top">u8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#ga98f0fd168112b8b7db59bcd7a325a5c5">mqtt_client_is_connected</a> (<a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *client)</td></tr>
<tr class="separator:ga98f0fd168112b8b7db59bcd7a325a5c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafdfa0e65b217e92835d35858924565cf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gafdfa0e65b217e92835d35858924565cf">mqtt_set_inpub_callback</a> (<a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *client, <a class="el" href="group__mqtt.html#ga7116bb85255394cec4b1d9fa38842c29">mqtt_incoming_publish_cb_t</a>, <a class="el" href="group__mqtt.html#gafec7e75fe6a746eef9ca411463446c81">mqtt_incoming_data_cb_t</a> data_cb, void *arg)</td></tr>
<tr class="separator:gafdfa0e65b217e92835d35858924565cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafdb39d4a9758f98c02451aaa9a9b3103"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gafdb39d4a9758f98c02451aaa9a9b3103">mqtt_sub_unsub</a> (<a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *client, const char *topic, u8_t qos, <a class="el" href="group__mqtt.html#gacad2bbe2cee76eaa120cc63e2f6094fd">mqtt_request_cb_t</a> cb, void *arg, u8_t sub)</td></tr>
<tr class="separator:gafdb39d4a9758f98c02451aaa9a9b3103"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade9850d716e81fde572cb012be795d2f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mqtt.html#gade9850d716e81fde572cb012be795d2f">mqtt_publish</a> (<a class="el" href="structmqtt__client__s.html">mqtt_client_t</a> *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, <a class="el" href="group__mqtt.html#gacad2bbe2cee76eaa120cc63e2f6094fd">mqtt_request_cb_t</a> cb, void *arg)</td></tr>
<tr class="separator:gade9850d716e81fde572cb012be795d2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>MQTT client </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_4e6b3cf33a61b6caac9c8ac30c866f37.html">lwip</a></li><li class="navelem"><a class="el" href="dir_f9284811ac594eafdc3134d5f8b945cb.html">apps</a></li><li class="navelem"><a class="el" href="mqtt_8h.html">mqtt.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
